{include file="common/_meta" /}
<title>用户管理</title>
<meta name="keywords" content="李志立，lizhilimaster@163.com">
<meta name="description" content="李志立，lizhilimaster@163.com">
</head>
<body>
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 用户中心 <span class="c-gray en">&gt;</span>
		用户管理 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);"
		 title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
	<div class="page-container">
		<div class="text-c">
			<form action="" method="get">
				<input type="text" class="input-text" style="width:250px" placeholder="输入用户名或手机号" value="{$key}" name="key">
				<button type="submit" class="btn btn-success radius"><i class="Hui-iconfont">&#xe665;</i> 搜用户</button>
			</form>
		</div>
		<div class="cl pd-5 bg-1 bk-gray mt-20" id="xian" > <span class="l"></span>
			<span class="r">
		共有数据：<strong>{$count1}</strong>
				条</span>
		</div>
		<div class="mt-20">
			<table class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
						<th width="20">ID</th>
						<th width="100">头像</th>
						<th width="50">用户名</th>
					 	<th width="90">手机</th>
						<th width="50">选择</th>
					</tr>
				</thead>
				<tbody>
					<tr class="text-c">
						<td>0</td>
						<td>没有上传头像	</td>
						<td>无数据</td>
					 	<td>无数据</td>
						<td class="td-manage">
							<span onclick="user_stop(this,0)" class="btn btn-danger radius">取消选中</span>
						</td>
					</tr>
					{volist name="user" id="vo"}
					<tr class="text-c">
						<td>{$vo.id}</td>
						<td>
							{if $vo.avatarUrl}
							<img src="{$vo.avatarUrl}" height="80">
							{else /}
							没有上传头像
							{/if}
						</td>
						<td>{$vo.name ?: $vo.phone}</td>
						
					 	<td>{$vo.phone|default='尚未填写'}</td>
						
						<td class="td-manage">
							{if $vo.xuan}
							<span  class="btn btn-default radius">{$vo.xuan}</span>
							{else /}
							<span onclick="user_stop(this,{$vo.id})" class="btn btn-success radius">选中</span>
							{/if}
						</td>
					</tr>
					{/volist}
				</tbody>
			</table>
			{$user|raw}
		</div>
	</div>
	{include file="common/_footer" /}
	<!--请在下方写此页面业务相关的脚本-->
	<script type="text/javascript">
		
		/*管理员-停用*/
		function user_stop(obj, id) {
			layer.confirm('确认要选中吗？', function(index) {
				//此处请求后台程序，下方是成功后的前台处理……
				$.post(
					"{:url('tuan/ajax')}", {
						id: id,
						tuan_id:{:input('tuan_id')},
						type: 'tuan_xuan',
					},
					function(result) {
						if (result === 1) {
							　parent.location.reload();
							layer.msg('选择成功!', {
								icon: 5,
								time: 1000
							});
						} else {
							layer.msg('失败!', {
								icon: 5,
								time: 1000
							});
						}
					});
			});
		}

		

	</script>
</body>
</html>
